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
//	wfp = (int)writeFunctionBuffer + 0x8000;
	//wf = (WriteFunction_t)(wfp);
	//wf = (WriteFunction_t)0x8000;
	uint8 i;
	//TRACE("Address of i: %04x\r\n", &i);
	TRACE("IEEE Address: ");
	for(i = 0; i < 8; i++)
		TRACE("%02x ", pInformation[i]);
	TRACE("\r\n");
	while(1);
	
}